﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Core.Unity.Wpf;
using Microsoft.Practices.Unity;
using Services;

namespace ViewModels {
    public class DataTableViewModel : INotifyPropertyChanged, IDisplayTable  {
        public event PropertyChangedEventHandler PropertyChanged;

        private object[] _DisplayData;

        string _TableViewVisibility = "Visible";
        string _CardViewVisibility = "Visible";

        public object[] DisplayData {
            get {
                return _DisplayData;
            }
            set {
                _DisplayData = value; 
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs("DisplayData"));
            }
        }

        public string TableViewVisibility {
            get {
                return _TableViewVisibility;
            }
            set {
                _TableViewVisibility = value;
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs("TableViewVisibility"));
            }
        }

        public string CardViewVisibility {
            get {
                return _CardViewVisibility;
            }
            set {
                _CardViewVisibility = value;
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs("CardViewVisibility"));
            }
        }

        public DataTableViewModel(ContainerWpf container) {
            container.Register<IDisplayTable>(this);
        }
         
        public IVisitor AddRowVisitor {
            get;
            set;
        } 
    }
}
